<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-15 21:52:37
 * @LastEditTime: 2019-10-16 09:54:07
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div class="w">
    <div class="header curpoit">
      <p @click="goredict">实名认证</p>
      <p  @click=" gosvaemon">保证金</p>
      <p @click="goejor" class="linetobottom">分成资格认证</p>
    </div>
    <div>
      <el-row>
        <el-col :span="10" :offset="1">
          <el-form ref="form" :model="form" label-width="100px" label-position="right">
            <el-form-item label="证券营业部:">
              <el-input v-model="form.name" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="证券账号:">
              <el-input v-model="form.name1" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="通道密码:">
              <el-input v-model="form.name2" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="证卷密码:">
              <el-input v-model="form.name3" placeholder="必填"></el-input>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="11" :offset="1">
          <!-- 上传 -->
          <div class="playce" style="justify-content:center">
            <el-upload
              class="avatar-uploader"
              action="#"
              :show-file-list="false"
              :on-success="handleAvatarSuccess"
              :before-upload="beforeAvatarUpload"
            >
              <img v-if="imageUrl" :src="imageUrl" class="avatar" />
              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
            <el-image style="width: 110px; height: 110px;margin-left:10px" src="url" fit="fit"></el-image>
          </div>
          <div style="text-align:center">
            <el-button type="primary">申请分成炒股资格</el-button>
          </div>
        </el-col>
      </el-row>
      <el-row style="margin-top:10px;line-height: 30px;">
        <el-col :span="20" :offset="2">
          <h3>温馨提示</h3>
        </el-col>
        <el-col :span="22" :offset="2">最近一年交割单截图:要求:收益率跑赢上证大盘指数，且年收益率不低于50%，客服审批后获得发布分成代炒股资格有效期一年</el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: "",
        name1: "",
        name2: "",
        name3: ""
      },
      imageUrl: "",
      url:
        "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      srcList: [
        "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
        "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg"
      ]
    };
  },
  methods: {
    handleAvatarSuccess(res, file) {
      this.imageUrl = URL.createObjectURL(file.raw);
      console.log(this.imageUrl);
    },
    beforeAvatarUpload(file) {
      const isJPG = file.type === "image/jpeg";
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 格式!");
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return isJPG && isLt2M;
    },
    fucker() {
      console.log("上传成功");
    },
    goredict() {
      this.$router.push({ path: "/Account/Certification" });
    },
    gosvaemon() {
      this.$router.push({ path: "/Account/Margin" });
    },
    goejor() {
      this.$router.push({ path: "/Account/quali" });
    }
  }
};
</script>

<style >
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.playce {
  padding: 30px 0;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.juzjianb {
  display: flex;
  justify-content: space-between;

  align-items: center;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 110px;
  height: 110px;
  line-height: 110px;
  text-align: center;
}

.avatar {
  width: 110px;
  height: 110px;
  display: block;
}
</style>
